home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CTextFile 1.1 / CTextFile.about next >
Encoding:
Text File  |  1994-11-30  |  3.1 KB  |  52 lines  |  [TEXT/ttxt]

  1. This is v1.1 of a data file class which gives TCL support for text files à la Pascal's TEXT files. But since it is a CDataFile subclass, the file behaves like a Mac file. Check out the new Demos!
  2.  
  3. For simplicity, only String reading is supported. However, the Pascal ReadString/StringOf procedures can be used to fully impliment the ReadLn/WriteLn procedures. Each file can be open for either input or output at any one time. Reads are buffered in a 512-byte buffer in the object. This buffer's size is customizable. The reads try to impliment all the standard Pascal TEXT behavior, including the obscure behavior if the file ends with something other than an EOL char.
  4.  
  5. This class is shareware. If you write a program that brings you much joy, please send me either a postcard or EMail sharing that joy. If you use it to write a distributed program (shareware, freeware, commercial), please send me a copy /w documentation (electronically is cool).
  6.  
  7. If this last requirement troubles you (such as the program you write works with proprietary data and/or is written under contract), send me a postcard (or EMail) to encourage future work, and give some money to a non-political charity. Come on, don't be too cheep. Oh, I mean charities like: UNICEF, Am. Cancer Soc., Am. Diabeties Assoc., United Negro College Fund, politically-nonactive religeous mission funds, etc.
  8.  
  9. © 1992 by William Studenmund. All rights reserved. Provided as-is.
  10. Claris the Dogcow, whose sig is in the .sig sample, is inspiration to many programmers at Apple and elsewhere. No guaranty made as to if the sample sig's address works or reaches Claris the Dogcow.
  11.  
  12. Please report any bugs, comments, or suggestions. :)
  13.  
  14. Enjoy!
  15.  
  16. William Studenmund
  17. wrstuden@leland.stanford.edu
  18. Applied Physics Department
  19. Ginzton Lab
  20. Stanford CA 94305
  21.  
  22.  
  23.  
  24. Changes since v1.0:
  25.  
  26. • No known bugs, so none fixed.
  27.  
  28. • Bundled three sample programs demonstrating some ways to use the class.
  29.         The demos are:
  30.                     SigAdder : appends one text file to another. Provides the functionality of adding
  31.                                 a .sig to UNIX EMail. Simplest example.
  32.                     Segmenter: takes a text file and breaks it up by line into chunks just over 32000
  33.                                 chars. long. Useful for breaking a BinHex-ed file into 32K pieces for mailing
  34.                                 over Applelink or C.S.M.B.
  35.                     Transposer: reads a two column matrix of ASCII numbers from one file, and
  36.                                 writes the transpose of the matrix to another file. Shows off how to read
  37.                                 and write reals from/to text files. Sample source matrix files saved in:
  38.                                             MatLab /ASCII format
  39.                                             Excel Text format (Tab seperators)
  40.                                             Excel CVS format
  41.             All demos are working programs, not code snippets. They are written procedurally
  42.                     since they were written over a weekend and just want to show off the CTextFile
  43.                     class. Projects w/o objects included. The .rsrc files for each one are copies of
  44.                     the .rsrc Symantec provides with the StarterApp.
  45.  
  46. • Added more Pascal-esque methods:
  47.  
  48.     procedure Seek (thePlace: longint);
  49.     function Filepos: longint;
  50.     procedure Reset;
  51.     procedure Rewrite;
  52.     procedure OpenForAppending;